home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / Xm / XmVaCreateSimplePulldownMenu.z / XmVaCreateSimplePulldownMenu
Text File  |  1998-10-30  |  15KB  |  265 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnUUUUuuuuNNNN((((IIII3333XXXXXXXX))))SSSSyyyyssssXXXXttttmmmmeeeeVVVVmmmmaaaaCCCCVVVVrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu - A RowColumn widget
  10.           convenience creation function
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.           #include <Xm/RowColumn.h>
  14.           WWWWiiiiddddggggeeeetttt XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu(
  15.           WWWWiiiiddddggggeeeetttt ppppaaaarrrreeeennnntttt,
  16.           SSSSttttrrrriiiinnnngggg nnnnaaaammmmeeee,
  17.           iiiinnnntttt ppppoooosssstttt____ffffrrrroooommmm____bbbbuuuuttttttttoooonnnn,
  18.           XXXXttttCCCCaaaallllllllbbbbaaaacccckkkkPPPPrrrroooocccc ccccaaaallllllllbbbbaaaacccckkkk);
  19.  
  20.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  21.           This page documents Motif 2.1.
  22.  
  23.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.           XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu creates an instance of a
  25.           RowColumn widget of type XXXXmmmmMMMMEEEENNNNUUUU____PPPPUUUULLLLLLLLDDDDOOOOWWWWNNNN and returns the
  26.           associated widget ID.  This routine uses the ANSI C
  27.           variable-length argument list (_v_a_r_a_r_g_s) calling convention.
  28.  
  29.           This routine creates a Pulldown menu pane and its button
  30.           children.  The name of each button is bbbbuuuuttttttttoooonnnn_____n, where _n is
  31.           an integer from 0 to the number of buttons in the menu minus
  32.           1.  The name of each separator is sssseeeeppppaaaarrrraaaattttoooorrrr_____n, where _n is an
  33.           integer from 0 to the number of separators in the menu minus
  34.           1.  The name of each title is llllaaaabbbbeeeellll_____n, where _n is an integer
  35.           from 0 (zero) to the number of titles in the menu minus 1.
  36.           Buttons, separators, and titles are named and created in the
  37.           order in which they are specified in the variable portion of
  38.           the argument list.
  39.  
  40.           This routine also attaches the PulldownMenu to a
  41.           CascadeButton or CascadeButtonGadget in the parent.  The
  42.           PulldownMenu is then posted from this button.
  43.  
  44.           _p_a_r_e_n_t    Specifies the widget ID of the parent of the
  45.                     MenuShell.
  46.  
  47.           _n_a_m_e      Specifies the name of the created widget.
  48.  
  49.           _p_o_s_t__f_r_o_m__b_u_t_t_o_n
  50.                     Specifies the CascadeButton or CascadeButtonGadget
  51.                     in the parent to which the Pulldown menu pane is
  52.                     attached.  The value is the integer _n that
  53.                     corresponds to the _nth CascadeButton or
  54.                     CascadeButtonGadget specified for the parent of
  55.                     the Pulldown menu pane.  A Pulldown menu pane can
  56.                     be attached only to a CascadeButton or
  57.                     CascadeButtonGadget, and only CascadeButtons and
  58.                     CascadeButtonGadgets are counted in determining
  59.                     the integer _n.  The first CascadeButton or
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 10/24/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnUUUUuuuuNNNN((((IIII3333XXXXXXXX))))SSSSyyyyssssXXXXttttmmmmeeeeVVVVmmmmaaaaCCCCVVVVrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu((((3333XXXX))))
  71.  
  72.  
  73.  
  74.                     CascadeButtonGadget is number 0 (zero).
  75.  
  76.           _c_a_l_l_b_a_c_k  Specifies a callback procedure to be called when a
  77.                     button is activated or when its value changes.
  78.                     This callback function is added to each button
  79.                     after creation.  For a CascadeButtonGadget or a
  80.                     PushButtonGadget, the callback is added as the
  81.                     button's XXXXmmmmNNNNaaaaccccttttiiiivvvvaaaatttteeeeCCCCaaaallllllllbbbbaaaacccckkkk, and it is called
  82.                     when the button is activated.  For a
  83.                     ToggleButtonGadget, the callback is added as the
  84.                     button's XXXXmmmmNNNNvvvvaaaalllluuuueeeeCCCChhhhaaaannnnggggeeeeddddCCCCaaaallllllllbbbbaaaacccckkkk, and it is called
  85.                     when the button's value changes.  The button
  86.                     number is returned in the _c_l_i_e_n_t__d_a_t_a field.
  87.  
  88.           The variable portion of the argument list consists of groups
  89.           of arguments.  The first argument in each group is a
  90.           constant or a string and determines which arguments follow
  91.           in that group.  The last argument in the list must be NULL.
  92.           Following are the possible first arguments in each group of
  93.           _v_a_r_a_r_g_s:
  94.  
  95.           XXXXmmmmVVVVaaaaCCCCAAAASSSSCCCCAAAADDDDEEEEBBBBUUUUTTTTTTTTOOOONNNN
  96.                     This is followed by two additional arguments. The
  97.                     set specifies one button in the PulldownMenu and
  98.                     some of its resource values. The button created is
  99.                     a CascadeButtonGadget. Following are the
  100.                     additional two arguments, in order:
  101.  
  102.                     _l_a_b_e_l     The label string, of type XXXXmmmmSSSSttttrrrriiiinnnngggg
  103.  
  104.                     _m_n_e_m_o_n_i_c  The mnemonic, of type KKKKeeeeyyyySSSSyyyymmmm
  105.  
  106.           XXXXmmmmVVVVaaaaPPPPUUUUSSSSHHHHBBBBUUUUTTTTTTTTOOOONNNN
  107.                     This is followed by four additional arguments. The
  108.                     set specifies one button in the PulldownMenu and
  109.                     some of its resource values. The button created is
  110.                     a PushButtonGadget. Following are the additional
  111.                     four arguments, in order:
  112.  
  113.                     _l_a_b_e_l     The label string, of type XXXXmmmmSSSSttttrrrriiiinnnngggg
  114.  
  115.                     _m_n_e_m_o_n_i_c  The mnemonic, of type KKKKeeeeyyyySSSSyyyymmmm
  116.  
  117.                     _a_c_c_e_l_e_r_a_t_o_r
  118.                               The accelerator, of type SSSSttttrrrriiiinnnngggg
  119.  
  120.                     _a_c_c_e_l_e_r_a_t_o_r__t_e_x_t
  121.                               The accelerator text, of type XXXXmmmmSSSSttttrrrriiiinnnngggg
  122.  
  123.           XXXXmmmmVVVVaaaaRRRRAAAADDDDIIIIOOOOBBBBUUUUTTTTTTTTOOOONNNN
  124.                     This is followed by four additional arguments. The
  125.                     set specifies one button in the PulldownMenu and
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 10/24/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnUUUUuuuuNNNN((((IIII3333XXXXXXXX))))SSSSyyyyssssXXXXttttmmmmeeeeVVVVmmmmaaaaCCCCVVVVrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu((((3333XXXX))))
  137.  
  138.  
  139.  
  140.                     some of its resource values. The button created is
  141.                     a ToggleButtonGadget. Following are the additional
  142.                     four arguments, in order:
  143.  
  144.                     _l_a_b_e_l     The label string, of type XXXXmmmmSSSSttttrrrriiiinnnngggg
  145.  
  146.                     _m_n_e_m_o_n_i_c  The mnemonic, of type KKKKeeeeyyyySSSSyyyymmmm
  147.  
  148.                     _a_c_c_e_l_e_r_a_t_o_r
  149.                               The accelerator, of type SSSSttttrrrriiiinnnngggg
  150.  
  151.                     _a_c_c_e_l_e_r_a_t_o_r__t_e_x_t
  152.                               The accelerator text, of type XXXXmmmmSSSSttttrrrriiiinnnngggg
  153.  
  154.           XXXXmmmmVVVVaaaaCCCCHHHHEEEECCCCKKKKBBBBUUUUTTTTTTTTOOOONNNN
  155.                     This is followed by four additional arguments. The
  156.                     set specifies one button in the PulldownMenu and
  157.                     some of its resource values. The button created is
  158.                     a ToggleButtonGadget. Following are the additional
  159.                     four arguments, in order:
  160.  
  161.                     _l_a_b_e_l     The label string, of type XXXXmmmmSSSSttttrrrriiiinnnngggg....
  162.  
  163.                     _m_n_e_m_o_n_i_c  The mnemonic, of type KKKKeeeeyyyySSSSyyyymmmm
  164.  
  165.                     _a_c_c_e_l_e_r_a_t_o_r
  166.                               The accelerator, of type SSSSttttrrrriiiinnnngggg
  167.  
  168.                     _a_c_c_e_l_e_r_a_t_o_r__t_e_x_t
  169.                               The accelerator text, of type XXXXmmmmSSSSttttrrrriiiinnnngggg
  170.  
  171.           XXXXmmmmVVVVaaaaTTTTIIIITTTTLLLLEEEE This is followed by one additional argument. The
  172.                     pair specifies a title LabelGadget in the
  173.                     PulldownMenu. Following is the additional
  174.                     argument:
  175.  
  176.                     _t_i_t_l_e     The title string, of type XXXXmmmmSSSSttttrrrriiiinnnngggg
  177.  
  178.           XXXXmmmmVVVVaaaaSSSSEEEEPPPPAAAARRRRAAAATTTTOOOORRRR
  179.                     This is followed by no additional arguments. It
  180.                     specifies one separator in the PulldownMenu.
  181.  
  182.           XXXXmmmmVVVVaaaaDDDDOOOOUUUUBBBBLLLLEEEE____SSSSEEEEPPPPAAAARRRRAAAATTTTOOOORRRR
  183.                     This is followed by no additional arguments. It
  184.                     specifies one separator in the PulldownMenu. The
  185.                     separator type is XXXXmmmmDDDDOOOOUUUUBBBBLLLLEEEE____LLLLIIIINNNNEEEE.
  186.  
  187.           _r_e_s_o_u_r_c_e__n_a_m_e
  188.                     This is followed by one additional argument, the
  189.                     value of the resource, of type XtArgVal. The pair
  190.                     specifies a resource and its value for the
  191.                     RowColumn widget.
  192.  
  193.  
  194.  
  195.      Page 3                                         (printed 10/24/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnUUUUuuuuNNNN((((IIII3333XXXXXXXX))))SSSSyyyyssssXXXXttttmmmmeeeeVVVVmmmmaaaaCCCCVVVVrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu((((3333XXXX))))
  203.  
  204.  
  205.  
  206.           XXXXttttVVVVaaaaTTTTyyyyppppeeeeddddAAAArrrrgggg
  207.                     This is followed by four additional arguments. The
  208.                     set specifies a resource and its value for the
  209.                     RowColumn widget. A resource type conversion is
  210.                     performed if necessary. Following are the
  211.                     additional four arguments, in order:
  212.  
  213.                     _n_a_m_e      The resource name, of type String.
  214.  
  215.                     _t_y_p_e      The type of the resource value supplied,
  216.                               of type String.
  217.  
  218.                     _v_a_l_u_e     The resource value (or a pointer to the
  219.                               resource value, depending on the type
  220.                               and size of the value), of type
  221.                               XtArgVal.
  222.  
  223.                     _s_i_z_e      The size of the resource value in bytes,
  224.                               of type int.
  225.  
  226.           XXXXttttVVVVaaaaNNNNeeeesssstttteeeeddddLLLLiiiisssstttt
  227.                     This is followed by one additional argument of
  228.                     type XtVarArgsList. This argument is a nested list
  229.                     of _v_a_r_a_r_g_s returned by XXXXttttVVVVaaaaCCCCrrrreeeeaaaatttteeeeAAAArrrrggggssssLLLLiiiisssstttt.
  230.  
  231.           For more information on variable-length argument lists, see
  232.           the X Toolkit Intrinsics documentation.
  233.  
  234.           A number of resources exist specifically for use with this
  235.           and other simple menu creation routines.  For a complete
  236.           definition of RowColumn and its associated resources, see
  237.           XXXXmmmmRRRRoooowwwwCCCCoooolllluuuummmmnnnn(3).
  238.  
  239.      RRRREEEETTTTUUUURRRRNNNN
  240.           Returns the RowColumn widget ID.
  241.  
  242.      RRRREEEELLLLAAAATTTTEEEEDDDD
  243.           XXXXmmmmCCCCrrrreeeeaaaatttteeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu(3), XXXXmmmmCCCCrrrreeeeaaaatttteeeeRRRRoooowwwwCCCCoooolllluuuummmmnnnn(3),
  244.           XXXXmmmmCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu, and XXXXmmmmRRRRoooowwwwCCCCoooolllluuuummmmnnnn(3).
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                         (printed 10/24/98)
  262.  
  263.  
  264.  
  265.